package com.stepin2it.advancedcalculator;

import java.util.Scanner;

public class AdvancedCalculator
{

	public static void main(String[] args)
	{
		System.out.println("Welcome to the Engineering Group at Stepin2IT");

		System.out.println("Engineer2 will add a method for adding 2 integers");

		CalculatorBrain cb = new CalculatorBrain();

		System.out.print("Enter first number : ");
		Scanner scanner = new Scanner(System.in);
		int m = scanner.nextInt();

		System.out.print("Enter second number : ");
		scanner = new Scanner(System.in);
		int n = scanner.nextInt();

		System.out.println("What operation : \n" + "1:  For + (add)"
				+ "2 : For - (subtract) " + "3 : For * (multiply) "
				+ "4 : For / (divide) \n");

		scanner = new Scanner(System.in);
		int operation = scanner.nextInt();
		scanner.close();
		switch (operation) {
		case 1:
		{
			System.out.println("Result : " + cb.add(m, n));
			return;
		}
		case 2:
		{
			System.out.println("Result : " + cb.sub(m, n));
			return;
		}
		case 3:
		{
			System.out.println("Result : " + cb.multiply(m, n));
			return;
		}
		case 4:
		{
			System.out.println("Result : " + cb.divide(m, n));
			return;
		}
		}

	}
}
